An introduction to knowledge graphs and their embeddings.
An Introduction to embeddings Algorithms.
Analysis and comparison of the performance of different algorithms.
Embedeep is a project launched this year that involves creating Python notebooks for educational purposes on knowledge graph embeddings.
There will be a total of three notebooks: one introducing the concept of knowledge graphs, one presenting TransE, a embedding algorithm, and finally one comparing their performance.
If time permits, we would also like to create two additional notebooks, each presenting DistMult and RotatE, two additional embedding algorithms.
Nevertheless, we would like to focus primarily on the TransE algorithm, as it was one of the first to be developed and, in a sense, paved the way for others.
We are seven fourth-year students in the Computer Science Department at INSA Rennes. Embedeep is our year-long project, designed to help us develop our skills and learn how to plan a project, write scientific reports properly, and improve our ability to work as a team.
Each notebook covers an important topic within the project. They are designed for educational purposes, and although each one works independently of the others, we recommend that you at least review the introductory notebook before diving into the algorithms, so that you have a basic understanding of the concepts covered and can fully grasp the other notebooks.
This first notebook serves as an introduction to the principles of knowledge graphs and their properties. After a few explanatory paragraphs, it presents the sample dataset created for these lab exercises, consisting of 171 triplets, 79 entities, and 12 different relations. Using the NetworkX library, the user will be able to visualize this knowledge graph dynamically and will be asked to answer a few questions to verify that they understand what such a graph represents and whether they can identify certain properties of the graph (symmetry, antisymmetry, composition, inversion). The user can then proceed to the notebook of their choice.
The purpose of this notebook is to present the TransE embedding algorithm. It walks through all the steps of the algorithm’s operation, explaining how it represents entities and relationships, its score and loss functions, how it generates negative examples, and its overall algorithm. Users are guided through these concepts and are provided with various exercises and answers to help them better grasp the different concepts.
The purpose of this notebook is to compare several knowledge graph embedding algorithms in order to evaluate their performance in link prediction. To do this, we use the FB15K-237 dataset, sourced from Freebase. The results are then evaluated using metrics such as Hits@k and meanRank to analyze performance differences between models and understand how parameters influence the results.